package com.baobao_jk.tutorialmod.init;

import java.util.ArrayList;
import java.util.List;

import com.baobao_jk.tutorialmod.items.ItemBase;

import com.baobao_jk.tutorialmod.items.ItemBloodsave;
import com.baobao_jk.tutorialmod.items.ItemIceicon;
import com.baobao_jk.tutorialmod.items.armor.ArmorBase;
import com.baobao_jk.tutorialmod.items.food.FoodBase;
import com.baobao_jk.tutorialmod.items.food.FoodEffectBase;
import com.baobao_jk.tutorialmod.items.tools.ToolSword;
import com.baobao_jk.tutorialmod.util.Reference;
import net.minecraft.init.MobEffects;
import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemSword;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.common.util.EnumHelper;

public class ModItems {

    public static final List<Item> ITEMS = new ArrayList<Item>(); //创建一个物品组

    public static final Item RUBY = new ItemBase("ruby"); //添加物品到物品组

    public static final Item.ToolMaterial MATERIAL_RUBY = EnumHelper.addToolMaterial("material_ruby", 3, 250, 8.0F, 3.0F, 10);

    public static final ItemArmor.ArmorMaterial ARMOR_MATERIAL_RUBY = EnumHelper.addArmorMaterial("armor_material_ruby", Reference.MOD_ID + ":ruby", 14, new int[] {2,5,7,3}, 10, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 0.0F);

    public static final ItemBloodsave ITEM_BLOODSAVE = new ItemBloodsave();

    public static final ItemIceicon ITEM_ICEICON = new ItemIceicon();

//    new PotionEffect(MobEffects.POISON, (60*20), 1, false, true)
//
//            new PotionEffect -> 是创建一个效果 BUFF
//
//
//    MobEffects.POISON -> 设置 BUFF 类型
//
//            (60*20) -> 是持续时间 ----- 1分钟
//
//1 -> BUFF 等级 -> 0是一级，1是二级，2是三级
//
//false -> 我猜测应该是一个范围类型的设置
//    true -> 是否开启粒子效果
    public static final Item EVIL_APPLE = new FoodEffectBase("evil_apple", 4, 2.4f, false, new PotionEffect(MobEffects.POISON, (60*20), 1, false, true));

    //tools
    public static final ItemSword RUBY_SWORD = new ToolSword("ruby_sword", MATERIAL_RUBY);

    //Armor
    public static final Item RUBY_HELMET = new ArmorBase("ruby_helmet", ARMOR_MATERIAL_RUBY, 1, EntityEquipmentSlot.HEAD);
    public static final Item RUBY_CHESTPLATE = new ArmorBase("ruby_chestplate", ARMOR_MATERIAL_RUBY, 1, EntityEquipmentSlot.CHEST);
    public static final Item RUBY_LEGGINGS = new ArmorBase("ruby_leggings", ARMOR_MATERIAL_RUBY, 2, EntityEquipmentSlot.LEGS);
    public static final Item RUBY_BOOTS = new ArmorBase("ruby_boots", ARMOR_MATERIAL_RUBY, 1, EntityEquipmentSlot.FEET);
}

